package com.gmall.client.feign;

import com.gmall.common.result.Result;
import com.gmall.model.product.SkuInfo;
import com.gmall.model.product.dto.Category123IdNameDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

@FeignClient(value = "service-product",contextId = "ProductFeignClient")
public interface ProductFeignClient
{
    /**
     * openFeign
     * @param searchMap
     * @return
     */
    @PostMapping("admin/product/sku/getSkuInfoListAfterDateTime")
    List<SkuInfo> getSkuInfoListAfterDateTime(@RequestBody Map searchMap);

    @GetMapping("admin/product/sku/getSkuInfoById/{id}")
    Result<SkuInfo> getSkuInfoById(@PathVariable Long id);


    @GetMapping("admin/product/baseCategory/getCategory123IdNameDTO/{category3Id}")
    public Result<Category123IdNameDTO> getCategory123IdNameDTO(@PathVariable Long category3Id) ;

}
